'use strict';

var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var VoteSchema = new Schema({
  _meetingId: {type: mongoose.Schema.ObjectId, ref: 'Meeting'},
  title: String,
  agree: {type: Number, default: 0},
  disagree: {type: Number, default: 0},
  status: {type: String, default: 'wait'},
  meta: {
    created_at: {type: Date, default: Date.now},
    updated_at: {type: Date, default: Date.now}
  }
});

module.exports = mongoose.model('Vote', VoteSchema);
